//
//  CornerSection.h
//  Racing
//
//  Created by vy phan on 4/13/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Section.h"
#import "GameConstants.h"
#import "Vehicle.h"
#import "State.h"

@interface CornerSection : Section {
	@private 
		bool left; // left edge open
		bool top;  // top edge open
		int corner_x, corner_y;
}
-(id) initWithLeft:(bool)isLeft_ Top:(BOOL)isTop_ X:(int)x Y:(int)y;
-(int) type;
-(bool) toLeft;
-(bool) toTop;
-(int) cornerX;
-(int) cornerY;
-(BOOL) intersects:(Vehicle*)vehicle State:(State*)state;
-(void) checkCollision:(Vehicle*)vehicle State:(State*)state;
-(float) distanceToEnd:(Vehicle*)vehicle;
@end
